package com.ruicar.afs.cloud.afscase.dispatch.contract;

import com.ruicar.afs.cloud.afscase.dispatch.dto.CaseRuleAtomDto;
import com.ruicar.afs.cloud.common.core.util.IResponse;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.Map;

/**
 * @author: yaorui.zhang
 * @date: 2020年9月25日 11:48:33
 * @description: 规则原子调用接口
 */
@FeignClient(name = "ruleAtomFeign", url = "${com.greatwall.services.case-service.url}")
public interface CaseRuleAtomFeign {

    /**
     * 查询所有的车商
     */
    @ApiOperation("查询所有的车商")
    @PostMapping(value = "/carDealer/getAllCarDealers")
    IResponse getAllCarDealers(@RequestBody CaseRuleAtomDto caseRuleAtomDto, @RequestHeader Map<String, String> headers);

    /**
     * 查询所有的合作商
     */
    @ApiOperation("查询所有的合作商")
    @PostMapping(value = "/channelCaseInfo/getCaseBaseInfo")
    IResponse getCaseBaseInfo(@RequestBody CaseRuleAtomDto caseRuleAtomDto, @RequestHeader Map<String, String> headers);

    /**
     * 查询所有的合作商(用于规则原子)
     */
    @ApiOperation("查询所有的合作商")
    @PostMapping(value = "/channelCaseInfo/getAllCaseBaseInfo")
    IResponse getAllCaseBaseInfo(@RequestBody CaseRuleAtomDto caseRuleAtomDto, @RequestHeader Map<String, String> headers);

}
